<%-- 
    Document   : listaPois
    Created on : 19/05/2011, 19:57:34
    Author     : Luis Marcelo
--%>

<%@page import="coordenadas.Pois"%>
<%@page import="java.util.List"%>
<%@page import="coordenadas.PMFpois"%>
<%@page import="javax.jdo.PersistenceManager"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

    <head>
        <title>S A D E V</title>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

        <!-- **** layout stylesheet **** -->
        <link rel="stylesheet" type="text/css" href="style/style.css" />

        <!-- **** colour scheme stylesheet **** -->
        <link rel="stylesheet" type="text/css" href="style/orange.css" />       

    </head>

    <body>
        <div id="main">
            <div id="links">
                <!-- **** INSERT LINKS HERE **** -->
            </div>
            <div id="logo"><h1>SADEV</h1></div>
            <div id="menu">
                <ul>
                    <!-- **** INSERT NAVIGATION ITEMS HERE (use id="selected" to identify the page you're on **** -->
                    <li><a id="selected" href="index.jsp">Início</a></li>
                    <li><a href="pois.jsp">Cadastro</a></li>
                </ul>
            </div>
            <div id="content">
                <div id="column1">
                    <div class="sidebaritem">
                        <div class="sbihead">
                            <h1>   </h1>
                        </div>
                        <div class="sbicontent">
                           
                            
                        </div>
                    </div>
                    <div class="sidebaritem">
                        <div class="sbihead">
                            <h1>  </h1>
                        </div>
                        <div class="sbilinks">
                            <!-- **** INSERT ADDITIONAL LINKS HERE **** -->
                            <ul>
                                <li>   </li>
                            </ul>
                        </div>
                    </div>
                    <div class="sidebaritem">
                        <div class="sbihead">
                            <h1>   </h1>
                        </div>
                        <div class="sbicontent">
                            <!-- **** INSERT OTHER INFORMATION HERE **** -->
                            <p>

                            </p>
                        </div>
                    </div>
                </div>
                <div id="column2">
                    <h1>Pontos de Interesse Cadastrados</h1>
                    <!-- **** INSERT PAGE CONTENT HERE **** -->
                    
                    <div id="colour">
                        <%
                            PersistenceManager pmPois = PMFpois.get().getPersistenceManager();
                            String query = " select from " + Pois.class.getName();
                            List<Pois> poiss = (List<Pois>) pmPois.newQuery(query).execute();
                            if (poiss.isEmpty()) {
                        %>
                        <p>Nenhum ponto de interesse cadastrado cadastrado.</p>
                        <%
                            } else {
                        %>
                        
                        <table border=3 bgcolor='yellow' align="center">
                        <tr>
                        <b><td align="center" width="200">LATITUDE</td> <td align="center" width="200">LONGITUDE</td></b>
                        </tr>

                        <%
                             for (Pois p : poiss) {                              
                        %>

                        <tr>
                        <td id="colunab" align="center" bgcolor='#aaddbb' border=1 rowspan="1"> <%= p.getLatitude()%>  </td>
                        <td id="colunac" align="center" bgcolor='#aaddbb' border=1 rowspan="1"> <%= p.getLongitude()%> </td>
                        </tr>

                        <%                          
                          }
                          }
                           pmPois.close();
                        %>
                        
                        </table>
                    </div>
                </div>
            </div>
            <div id="footer">
                 | <a href="#">  </a> | <a href="http://validator.w3.org/check?uri=referer">   </a> | <a href="http://jigsaw.w3.org/css-validator/check/referer"> </a> | <a href="http://www.dcarter.co.uk">  </a>
            </div>
        </div>
    </body>
</html>

